<script setup lang="ts">
defineProps<{
    tipText?: string; //提示的文字
    btnProps?: anyObj; // el-button的参数
}>();

defineOptions({ inheritAttrs: false });
</script>

<template>
    <div>
        <!-- 提示 -->
        <el-tooltip placement="top" :show-arrow="false">
            <template #content>
                <div class="tip-text">
                    {{ tipText }}
                </div>
            </template>
            <!-- 按钮 -->
            <el-button v-bind="$attrs">
                <slot />
            </el-button>
        </el-tooltip>
    </div>
</template>

<style scoped lang="scss">
@include b(tip-text) {
    max-width: 180px;
    text-align: justify;
}
</style>
